<template>
	<view class="content">
		<home v-if="navbar.pageDisplay == 0"></home>
		<writeSome v-if="navbar.pageDisplay == 1"></writeSome>
		<userCenter v-if='navbar.pageDisplay == 2'  class='murderStyle'></userCenter>
		<hans-tabber :list="list" style="position:fixed;bottom:0;width:100%;left:0;right:0;" @tabChange="tabChange"></hans-tabber>

	</view>
</template>

<script>
	import hansTabber from '../components/hans-tabbar/hans-tabbar.vue'
	import home from '../home/home.vue'
	import userCenter from '../usercenter/userCenter.vue'
	import writeSome from '../writeSome/LevineHua-editor.vue'

	import { mapActions, mapState, mapMutations, mapGetters } from "vuex";
	export default {
		components: {
			hansTabber,
			home,
			writeSome,
			userCenter
		},
		data() {
			return {
				edits:[],
				pageDisplay:0,//选择的页面默认值为0->home ; 1 -> addPage ; 2->userCenter  
				title: 'Hello',
				delImg:'../static/writeSome/shanchu.png',
				list: [{
						"text": "首页",
						"iconPath": '../../static/enter.png',
						"selectedIconPath": '../../static/enter-select.png'
					},
					{
						"text": "+",
						"iconPath": '../../static/correct.png',
						"selectedIconPath": '../../static/correct-select.png'
					},
					{
						"text": "个人中心",
						"iconPath": '../../static/analyse.png',
						"selectedIconPath": '../../static/analyse-select.png'
					}
				],
			}
		},
		computed:{
			...mapState(['navbar'],
			{
				Languages : state => state.languages,
				lang:state=>state.lang
			})
		},
		onLoad() {

		},
		methods: {
			tabChange(index) {
				this.navbar.pageDisplay = index;
				console.log("adminLanguages",this.navbar)
			}
		},
		mounted() {
			// console.log("----thi----",this.Languages)
			// console.log("lang-----",this.lang)
			// console.log("adminLanguages",this.navbar)
		}
	}
</script>

<style>
	.content {
		display: flex;
		flex-direction: column;
		align-items: center;
		justify-content: center;
	}

	.logo {
		height: 200rpx;
		width: 200rpx;
		margin-top: 200rpx;
		margin-left: auto;
		margin-right: auto;
		margin-bottom: 50rpx;
	}

	.text-area {
		display: flex;
		justify-content: center;
	}

	.title {
		font-size: 36rpx;
		color: #8f8f94;
	}
	.murderStyle{
		width: 100%;
	}
</style>
